.log-panel {
  height: 100%;
}

.log-panel .log-card {
  height: 100%;
}

.log-panel .log-card .ant-card-body {
  padding: 8px;
  height: calc(100% - 40px);
}

.log-panel .log-container {
  height: 100%;
  display: flex;
  flex-direction: column;
}

.log-panel .log-content {
  flex: 1;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  padding: 8px;
  overflow-y: auto;
  font-family: 'Courier New', 'Monaco', 'Menlo', monospace;
  font-size: 11px;
  line-height: 1.4;
  max-height: 200px;
  min-height: 120px;
}

.log-panel .log-line {
  display: flex;
  margin-bottom: 2px;
  padding: 2px 4px;
  border-radius: 3px;
  transition: background-color 0.2s ease;
}

.log-panel .log-line:hover {
  background: rgba(255, 255, 255, 0.05);
}

.log-panel .log-index {
  color: #666;
  margin-right: 8px;
  min-width: 30px;
  font-size: 10px;
  user-select: none;
}

.log-panel .log-content-text {
  color: #e0e0e0;
  word-break: break-all;
  flex: 1;
}

/* 不同日志级别的样式 */
.log-panel .log-error {
  background: rgba(244, 67, 54, 0.1);
  border-left: 3px solid #f44336;
}

.log-panel .log-error .log-content-text {
  color: #ffcdd2;
}

.log-panel .log-warning {
  background: rgba(255, 152, 0, 0.1);
  border-left: 3px solid #ff9800;
}

.log-panel .log-warning .log-content-text {
  color: #ffe0b2;
}

.log-panel .log-success {
  background: rgba(76, 175, 80, 0.1);
  border-left: 3px solid #4caf50;
}

.log-panel .log-success .log-content-text {
  color: #c8e6c9;
}

.log-panel .log-debug {
  background: rgba(156, 39, 176, 0.1);
  border-left: 3px solid #9c27b0;
}

.log-panel .log-debug .log-content-text {
  color: #e1bee7;
}

.log-panel .log-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: #666;
  font-style: italic;
}

.log-panel .log-footer {
  margin-top: 8px;
  padding: 4px 8px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* 滚动条样式 */
.log-panel .log-content::-webkit-scrollbar {
  width: 6px;
}

.log-panel .log-content::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
}

.log-panel .log-content::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.3);
  border-radius: 3px;
}

.log-panel .log-content::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.5);
}

/* 卡片标题样式 */
.log-panel .ant-card-head-title {
  font-size: 13px !important;
  color: #4fc3f7 !important;
}

.log-panel .ant-card-extra {
  margin-left: 8px;
}

.log-panel .ant-card-extra .ant-btn {
  font-size: 11px;
  height: 24px;
  padding: 0 6px;
}

/* Badge 样式 */
.log-panel .ant-badge {
  margin-left: 8px;
}

.log-panel .ant-badge-count {
  font-size: 10px;
  min-width: 16px;
  height: 16px;
  line-height: 16px;
  padding: 0 4px;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .log-panel .log-content {
    font-size: 10px;
    padding: 6px;
    max-height: 150px;
    min-height: 100px;
  }
  
  .log-panel .log-index {
    min-width: 25px;
    font-size: 9px;
    margin-right: 6px;
  }
  
  .log-panel .log-footer {
    margin-top: 6px;
    padding: 3px 6px;
  }
  
  .log-panel .ant-card-extra .ant-btn {
    font-size: 10px;
    height: 20px;
    padding: 0 4px;
  }
  
  .log-panel .ant-card-head-title {
    font-size: 12px !important;
  }
}

@media (max-width: 480px) {
  .log-panel .log-content {
    font-size: 9px;
    padding: 4px;
    max-height: 120px;
    min-height: 80px;
  }
  
  .log-panel .log-line {
    margin-bottom: 1px;
    padding: 1px 2px;
  }
  
  .log-panel .log-index {
    min-width: 20px;
    font-size: 8px;
    margin-right: 4px;
  }
  
  .log-panel .log-footer {
    margin-top: 4px;
    padding: 2px 4px;
  }
  
  .log-panel .ant-card-body {
    padding: 6px;
  }
  
  .log-panel .ant-card-extra .ant-btn {
    font-size: 9px;
    height: 18px;
    padding: 0 3px;
  }
}

/* 动画效果 */
.log-panel .log-line {
  animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 新日志高亮效果 */
.log-panel .log-line.new-log {
  background: rgba(79, 195, 247, 0.2);
  animation: highlight 2s ease-out;
}

@keyframes highlight {
  0% {
    background: rgba(79, 195, 247, 0.4);
  }
  100% {
    background: transparent;
  }
}

/* 连接状态指示 */
.log-panel .log-footer .ant-typography {
  margin-bottom: 0 !important;
}

/* 工具按钮悬停效果 */
.log-panel .ant-card-extra .ant-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  transition: all 0.2s ease;
}

/* 日志内容选择样式 */
.log-panel .log-content ::selection {
  background: rgba(79, 195, 247, 0.3);
  color: #ffffff;
}

.log-panel .log-content ::-moz-selection {
  background: rgba(79, 195, 247, 0.3);
  color: #ffffff;
}
